include ../.env
export $(shell sed 's/=.*//' ../.env)




HADOOP_IMAGE_NAME=${IMAGE_REPO}/hadoop-devel:${HADOOP_VERSION}

HADOOP_DOCKERFILE=Dockerfile


hadoop:
	cd ./build && docker build -t ${HADOOP_IMAGE_NAME}  \
	--build-arg HADOOP_VERSION=${HADOOP_VERSION} \
	--build-arg CENTOS_VERSION=${CENTOS_VERSION}  \
	--build-arg IMAGE_REPO=${IMAGE_REPO}  \
	--build-arg JDK_VERSION=${JDK_VERSION} \
	-f ${HADOOP_DOCKERFILE} .
ifeq (${PUSH},true)
	docker push ${IMAGE_NAME}
endif

.PHONY: compose
compose:
	cd compose && docker compose up -d

.PHONY: compose-clean
compose-clean:
	cd compose && docker compose down
